\(\int \frac {\sqrt {1+\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}}}{\sqrt {1-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}}} \, dx\) [297]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F(-2)]
   Mupad [F(-1)]

Optimal result

Integrand size = 59, antiderivative size = 95 \[ \int \frac {\sqrt {1+\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}}}{\sqrt {1-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}}} \, dx=\frac {\sqrt {b+\sqrt {b^2-4 a c}} E\left (\arcsin \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )|-\frac {b+\sqrt {b^2-4 a c}}{b-\sqrt {b^2-4 a c}}\right )}{\sqrt {2} \sqrt {c}} \]

[Out]

1/2*EllipticE(x*2^(1/2)*c^(1/2)/(b+(-4*a*c+b^2)^(1/2))^(1/2),((-b-(-4*a*c+b^2)^(1/2))/(b-(-4*a*c+b^2)^(1/2)))^
(1/2))*(b+(-4*a*c+b^2)^(1/2))^(1/2)*2^(1/2)/c^(1/2)

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.017, Rules used = {435} \[ \int \frac {\sqrt {1+\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}}}{\sqrt {1-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}}} \, dx=\frac {\sqrt {\sqrt {b^2-4 a c}+b} E\left (\arcsin \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )|-\frac {b+\sqrt {b^2-4 a c}}{b-\sqrt {b^2-4 a c}}\right )}{\sqrt {2} \sqrt {c}} \]

[In]

Int[Sqrt[1 + (2*c*x^2)/(b - Sqrt[b^2 - 4*a*c])]/Sqrt[1 - (2*c*x^2)/(b + Sqrt[b^2 - 4*a*c])],x]

[Out]

(Sqrt[b + Sqrt[b^2 - 4*a*c]]*EllipticE[ArcSin[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]], -((b + Sqrt[b^
2 - 4*a*c])/(b - Sqrt[b^2 - 4*a*c]))])/(Sqrt[2]*Sqrt[c])

Rule 435

Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[(Sqrt[a]/(Sqrt[c]*Rt[-d/c, 2]))*Ell
ipticE[ArcSin[Rt[-d/c, 2]*x], b*(c/(a*d))], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && GtQ[a, 0
]

Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {b+\sqrt {b^2-4 a c}} E\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )|-\frac {b+\sqrt {b^2-4 a c}}{b-\sqrt {b^2-4 a c}}\right )}{\sqrt {2} \sqrt {c}} \\ \end{align*}

Mathematica [A] (verified)

Time = 2.24 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.00 \[ \int \frac {\sqrt {1+\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}}}{\sqrt {1-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}}} \, dx=\frac {\sqrt {b+\sqrt {b^2-4 a c}} E\left (\arcsin \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )|-\frac {b+\sqrt {b^2-4 a c}}{b-\sqrt {b^2-4 a c}}\right )}{\sqrt {2} \sqrt {c}} \]

[In]

Integrate[Sqrt[1 + (2*c*x^2)/(b - Sqrt[b^2 - 4*a*c])]/Sqrt[1 - (2*c*x^2)/(b + Sqrt[b^2 - 4*a*c])],x]

[Out]

(Sqrt[b + Sqrt[b^2 - 4*a*c]]*EllipticE[ArcSin[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]], -((b + Sqrt[b^
2 - 4*a*c])/(b - Sqrt[b^2 - 4*a*c]))])/(Sqrt[2]*Sqrt[c])

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(808\) vs. \(2(80)=160\).

Time = 2.89 (sec) , antiderivative size = 809, normalized size of antiderivative = 8.52

method result size
elliptic \(\frac {\sqrt {\frac {-2 c \,x^{2}+\sqrt {-4 a c +b^{2}}-b}{-b +\sqrt {-4 a c +b^{2}}}}\, \left (-b +\sqrt {-4 a c +b^{2}}\right ) \sqrt {-\frac {\left (-2 c \,x^{2}+\sqrt {-4 a c +b^{2}}-b \right ) \left (-2 c \,x^{2}+\sqrt {-4 a c +b^{2}}+b \right )}{a c}}\, \left (\frac {\sqrt {2}\, \sqrt {1-\frac {2 c \,x^{2}}{-b +\sqrt {-4 a c +b^{2}}}}\, \sqrt {1-\frac {2 c \,x^{2}}{b +\sqrt {-4 a c +b^{2}}}}\, F\left (x \sqrt {2}\, \sqrt {\frac {c}{-b +\sqrt {-4 a c +b^{2}}}}, \frac {\sqrt {-4+\frac {2 \left (-\frac {2 c}{b +\sqrt {-4 a c +b^{2}}}+\frac {2 c}{b -\sqrt {-4 a c +b^{2}}}\right ) \left (b -\sqrt {-4 a c +b^{2}}\right )}{c}}}{2}\right )}{2 \sqrt {\frac {c}{-b +\sqrt {-4 a c +b^{2}}}}\, \sqrt {1-\frac {2 c \,x^{2}}{b +\sqrt {-4 a c +b^{2}}}+\frac {2 c \,x^{2}}{b -\sqrt {-4 a c +b^{2}}}-\frac {4 c^{2} x^{4}}{\left (b -\sqrt {-4 a c +b^{2}}\right ) \left (b +\sqrt {-4 a c +b^{2}}\right )}}}+\frac {2 c \sqrt {2}\, \sqrt {1-\frac {2 c \,x^{2}}{-b +\sqrt {-4 a c +b^{2}}}}\, \sqrt {1-\frac {2 c \,x^{2}}{b +\sqrt {-4 a c +b^{2}}}}\, \left (F\left (x \sqrt {2}\, \sqrt {\frac {c}{-b +\sqrt {-4 a c +b^{2}}}}, \frac {\sqrt {-4+\frac {2 \left (-\frac {2 c}{b +\sqrt {-4 a c +b^{2}}}+\frac {2 c}{b -\sqrt {-4 a c +b^{2}}}\right ) \left (b -\sqrt {-4 a c +b^{2}}\right )}{c}}}{2}\right )-E\left (x \sqrt {2}\, \sqrt {\frac {c}{-b +\sqrt {-4 a c +b^{2}}}}, \frac {\sqrt {-4+\frac {2 \left (-\frac {2 c}{b +\sqrt {-4 a c +b^{2}}}+\frac {2 c}{b -\sqrt {-4 a c +b^{2}}}\right ) \left (b -\sqrt {-4 a c +b^{2}}\right )}{c}}}{2}\right )\right )}{\left (-b +\sqrt {-4 a c +b^{2}}\right ) \sqrt {\frac {c}{-b +\sqrt {-4 a c +b^{2}}}}\, \sqrt {1-\frac {2 c \,x^{2}}{b +\sqrt {-4 a c +b^{2}}}+\frac {2 c \,x^{2}}{b -\sqrt {-4 a c +b^{2}}}-\frac {4 c^{2} x^{4}}{\left (b -\sqrt {-4 a c +b^{2}}\right ) \left (b +\sqrt {-4 a c +b^{2}}\right )}}\, \left (-\frac {2 c}{b +\sqrt {-4 a c +b^{2}}}+\frac {2 c}{b -\sqrt {-4 a c +b^{2}}}-\frac {b}{a}\right )}\right )}{2 \sqrt {\frac {-2 c \,x^{2}+\sqrt {-4 a c +b^{2}}+b}{b +\sqrt {-4 a c +b^{2}}}}\, \left (-2 c \,x^{2}+\sqrt {-4 a c +b^{2}}-b \right )}\) \(809\)

[In]

int((1+2*c*x^2/(b-(-4*a*c+b^2)^(1/2)))^(1/2)/(1-2*c*x^2/(b+(-4*a*c+b^2)^(1/2)))^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*((-2*c*x^2+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^2)^(1/2)))^(1/2)/((-2*c*x^2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^2)^(1/2)))/c*(b-(-4*a*c+b^2)^(1/2)))^(1/2))-EllipticE(x*2^(1/2)*(c/(-b+(-4*a*c+b^
2)^(1/2)))^(1/2),1/2*(-4+2*(-2*c/(b+(-4*a*c+b^2)^(1/2))+2*c/(b-(-4*a*c+b^2)^(1/2)))/c*(b-(-4*a*c+b^2)^(1/2)))^
(1/2))))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 318 vs. \(2 (77) = 154\).

Time = 0.14 (sec) , antiderivative size = 318, normalized size of antiderivative = 3.35 \[ \int \frac {\sqrt {1+\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}}}{\sqrt {1-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}}} \, dx=-\frac {2 \, \sqrt {\frac {1}{2}} {\left (\sqrt {b^{2} - 4 \, a c} b x + {\left (b^{2} - 2 \, a c\right )} x\right )} \sqrt {\frac {b + \sqrt {b^{2} - 4 \, a c}}{c}} \sqrt {-\frac {c}{a}} E(\arcsin \left (\frac {\sqrt {\frac {1}{2}} \sqrt {\frac {b + \sqrt {b^{2} - 4 \, a c}}{c}}}{x}\right )\,|\,-\frac {b^{2} - 2 \, a c - \sqrt {b^{2} - 4 \, a c} b}{2 \, a c}) - 2 \, \sqrt {\frac {1}{2}} {\left (\sqrt {b^{2} - 4 \, a c} {\left (b - c\right )} x + {\left (b^{2} - {\left (2 \, a - b\right )} c\right )} x\right )} \sqrt {\frac {b + \sqrt {b^{2} - 4 \, a c}}{c}} \sqrt {-\frac {c}{a}} F(\arcsin \left (\frac {\sqrt {\frac {1}{2}} \sqrt {\frac {b + \sqrt {b^{2} - 4 \, a c}}{c}}}{x}\right )\,|\,-\frac {b^{2} - 2 \, a c - \sqrt {b^{2} - 4 \, a c} b}{2 \, a c}) + {\left (b c + \sqrt {b^{2} - 4 \, a c} c\right )} \sqrt {\frac {b x^{2} + \sqrt {b^{2} - 4 \, a c} x^{2} + 2 \, a}{a}} \sqrt {-\frac {b x^{2} - \sqrt {b^{2} - 4 \, a c} x^{2} - 2 \, a}{a}}}{4 \, c^{2} x} \]

[In]

integrate((1+2*c*x^2/(b-(-4*a*c+b^2)^(1/2)))^(1/2)/(1-2*c*x^2/(b+(-4*a*c+b^2)^(1/2)))^(1/2),x, algorithm="fric
as")

[Out]

-1/4*(2*sqrt(1/2)*(sqrt(b^2 - 4*a*c)*b*x + (b^2 - 2*a*c)*x)*sqrt((b + sqrt(b^2 - 4*a*c))/c)*sqrt(-c/a)*ellipti
c_e(arcsin(sqrt(1/2)*sqrt((b + sqrt(b^2 - 4*a*c))/c)/x), -1/2*(b^2 - 2*a*c - sqrt(b^2 - 4*a*c)*b)/(a*c)) - 2*s
qrt(1/2)*(sqrt(b^2 - 4*a*c)*(b - c)*x + (b^2 - (2*a - b)*c)*x)*sqrt((b + sqrt(b^2 - 4*a*c))/c)*sqrt(-c/a)*elli
ptic_f(arcsin(sqrt(1/2)*sqrt((b + sqrt(b^2 - 4*a*c))/c)/x), -1/2*(b^2 - 2*a*c - sqrt(b^2 - 4*a*c)*b)/(a*c)) +
(b*c + sqrt(b^2 - 4*a*c)*c)*sqrt((b*x^2 + sqrt(b^2 - 4*a*c)*x^2 + 2*a)/a)*sqrt(-(b*x^2 - sqrt(b^2 - 4*a*c)*x^2
 - 2*a)/a))/(c^2*x)

Sympy [F]

\[ \int \frac {\sqrt {1+\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}}}{\sqrt {1-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}}} \, dx=\int \frac {\sqrt {\frac {b + 2 c x^{2} - \sqrt {- 4 a c + b^{2}}}{b - \sqrt {- 4 a c + b^{2}}}}}{\sqrt {- \frac {- b + 2 c x^{2} - \sqrt {- 4 a c + b^{2}}}{b + \sqrt {- 4 a c + b^{2}}}}}\, dx \]

[In]

integrate((1+2*c*x**2/(b-(-4*a*c+b**2)**(1/2)))**(1/2)/(1-2*c*x**2/(b+(-4*a*c+b**2)**(1/2)))**(1/2),x)

[Out]

Integral(sqrt((b + 2*c*x**2 - sqrt(-4*a*c + b**2))/(b - sqrt(-4*a*c + b**2)))/sqrt(-(-b + 2*c*x**2 - sqrt(-4*a
*c + b**2))/(b + sqrt(-4*a*c + b**2))), x)

Maxima [F]

\[ \int \frac {\sqrt {1+\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}}}{\sqrt {1-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}}} \, dx=\int { \frac {\sqrt {\frac {2 \, c x^{2}}{b - \sqrt {b^{2} - 4 \, a c}} + 1}}{\sqrt {-\frac {2 \, c x^{2}}{b + \sqrt {b^{2} - 4 \, a c}} + 1}} \,d x } \]

[In]

integrate((1+2*c*x^2/(b-(-4*a*c+b^2)^(1/2)))^(1/2)/(1-2*c*x^2/(b+(-4*a*c+b^2)^(1/2)))^(1/2),x, algorithm="maxi
ma")

[Out]

integrate(sqrt(2*c*x^2/(b - sqrt(b^2 - 4*a*c)) + 1)/sqrt(-2*c*x^2/(b + sqrt(b^2 - 4*a*c)) + 1), x)

Giac [F(-2)]

Exception generated. \[ \int \frac {\sqrt {1+\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}}}{\sqrt {1-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}}} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate((1+2*c*x^2/(b-(-4*a*c+b^2)^(1/2)))^(1/2)/(1-2*c*x^2/(b+(-4*a*c+b^2)^(1/2)))^(1/2),x, algorithm="giac
")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:sym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Valuesym2poly/r2sym(c
onst gen &

Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {1+\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}}}{\sqrt {1-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}}} \, dx=\int \frac {\sqrt {\frac {2\,c\,x^2}{b-\sqrt {b^2-4\,a\,c}}+1}}{\sqrt {1-\frac {2\,c\,x^2}{b+\sqrt {b^2-4\,a\,c}}}} \,d x \]

[In]

int(((2*c*x^2)/(b - (b^2 - 4*a*c)^(1/2)) + 1)^(1/2)/(1 - (2*c*x^2)/(b + (b^2 - 4*a*c)^(1/2)))^(1/2),x)

[Out]

int(((2*c*x^2)/(b - (b^2 - 4*a*c)^(1/2)) + 1)^(1/2)/(1 - (2*c*x^2)/(b + (b^2 - 4*a*c)^(1/2)))^(1/2), x)